import os
from uuid import uuid1

basedir = os.path.abspath(os.path.dirname(__name__))


class Config:
    # 邮箱配置
    SECRET_KEY = os.environ.get('SECRET_KEY') or uuid1().urn
    # FLASK_ADMIN = os.environ.get('FLASK_ADMIN') or 'yk120889@163.com'
    @staticmethod
    def init_app(app):
        pass

    # 静态方法, 不需要self, 可以直接调用


class DevelopmentConfig(Config):
    DEBUG = True


class TestingConfig(Config):
    TESTING = True


class ProductionConfig(Config):
    pass


config = {
    'development': DevelopmentConfig,
    'testing': TestingConfig,
    'production': ProductionConfig,
    'default': DevelopmentConfig
}